package com.zcl.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zcl.dao.Accident;
import com.zcl.mapper.AccidentMapper;

@Service
public class AccidentService {
	@Autowired
	AccidentMapper accidentMapper;
	/*
	 * 查询事故
	 */
	public List<Map<String, String>> accidentQuery(){
		return accidentMapper.accidentQuery();
	}
	
	/*
	 * 查询事故详情
	 */
	public Accident accidentSuveryInfo(Map<String, String> map) {
		return accidentMapper.accidentSuveryInfo(map);
	}
	
	/*
	 * 事故全文搜索
	 */
	public List<Map<String, String>> accidentGlobalQuery(Map<String, String> map) {
		return accidentMapper.accidentGlobalQuery(map);
	}
	
	/*
	 * 添加事故信息
	 */
	public void accidentAdd(Map<String, String> map) {
		accidentMapper.accidentAdd(map);
	}
	
	/*
	 * 删除事故信息
	 */
	public void accidentDelete(Map<String, String> map) {
		accidentMapper.accidentDelete(map);
	}

	/*
	 * 事故信息修改
	 */
	public void accidentRevise(Map<String, String> map) {
		accidentMapper.accidentRevise(map);
	}

	/*
	 * 事故高级搜索
	 */
	public List<Map<String, String>> accidentAdvancedQuery(Map<String, String> map) {
		return accidentMapper.accidentAdvancedQuery(map);
	}
	
	/**
	 * 事故发生月份统计
	 */
	public List<Map<String, String>> accidentCount(Map<String, String> map){
		return accidentMapper.accidentCount(map);
	}
	
	/**
	 * 事故发生种类
	 */
	public List<Map<String, String>> accidentKind(Map<String, String> map){
		return accidentMapper.accidentKind(map);
	}
}
